home *** CD-ROM | disk | FTP | other *** search
- NumSockets = 2 /* The number of sockets for Thor to use */
- MaxTries = 5 /* Maximum number of retries */
-
- /* Don't change anything below here */
-
- arg option
-
- if ~show('L','rexxdossupport.library') then
- call addlib('rexxdossupport.library',0,-30)
-
- options results
- address command
- options failat 21
-
- CmdStr = GetVar('Thor/ThorPath')'bin/GetTCP' SystemName 'PUBSCREEN Workbench GETONLY'
- MailStr = 'DELETE PASSWORD' Password 'MAILSERVER $MAILSERVER USERNAME $MAILBOX'
- NewsStr = 'NEWSSERVER $NEWSSERVER SOCKETS' NumSockets
-
- select
- when option = 'MAIL' then CmdStr = CmdStr 'NONEWS' MailStr
- when option = 'NEWS' then CmdStr = CmdStr 'NOMAIL' NewsStr
- when option = 'ALL' then CmdStr = CmdStr MailStr NewsStr
- otherwise ErrorMsg('Usage: Fetch Mail|News|All')
- end
-
- do try = 1 to MaxTries
- CmdStr
- if RC=0 then do
- leave try
- end
- end
-
- if try > MaxTries then ErrorMsg('Failed to get mail after' MaxTries 'attempts')
-
- exit
-
-
- ErrorMsg: Procedure
- parse arg Msg
- say
- say(Msg)
- say
- exit
- return
-
-